﻿<?php
/* @var $this BilletincidentController */
/* @var $model BILLETINCIDENT */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'billetincident-form',
	'htmlOptions'=>array('enctype'=>'multipart/form-data'),
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Les champs marqués <span class="required">*</span> sont requis.</p>
	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'ID_POSTE'); ?>
		<?php echo CHtml::dropDownList('poste','empty',$poste, array('empty' => 'Selectionnez un identifiant')); ?>
		<?php echo $form->error($model,'ID_POSTE'); ?>
	</div>

	<!--<div class="row">
		<?php echo $form->labelEx($model,'ID_EMETTEUR'); ?>
		<?php echo $form->textField($model,'ID_EMETTEUR'); ?>
		<?php echo $form->error($model,'ID_EMETTEUR'); ?>
	</div>-->
	
	<div class="row">
		<?php echo $form->labelEx($model,'PROBLEME'); ?>
		<?php echo CHtml::radioButtonList('probleme','field',array(  	0 => 'Problème logiciel',
																		1 => 'Problème materiel'),
															array('labelOptions'=>array('style'=>'display:inline', 'id'=>'checkbox'),
																	'separator' => " " )); ?>
		<?php echo $form->error($model,'PROBLEME'); ?>
	</div>

	<div id="logiciel">
		<div class="row">
			<?php echo $form->labelEx($model,'PROBLEME_LOGICIEL'); ?>
			<?php echo CHtml::dropDownList('pbLog','empty',$pbLog, array('empty' => 'Selectionnez un problème')); ?>
			<?php echo $form->error($model,'ID_PROBLEME_LOGICIEL'); ?>
		</div>
	
		<div class="row">
			<?php echo $form->labelEx($model,'LOGICIEL'); ?>
			<?php echo CHtml::dropDownList('log','empty',$log, array('empty' => 'Selectionnez un logiciel')); ?>
			<?php echo $form->error($model,'ID_LOGICIEL'); ?>
		</div>
	</div>

	<div id="materiel">
		<div class="row">
			<?php echo $form->labelEx($model,'PROBLEME_MATERIEL'); ?>
			<?php echo CHtml::dropDownList('pbMat','empty',$pbMat, array('empty' => 'Selectionnez un problème')); ?>
			<?php echo $form->error($model,'ID_PROBLEME_MATERIEL'); ?>
		</div>	

		<div class="row">
			<?php echo $form->labelEx($model,'MATERIEL'); ?>
			<?php echo CHtml::dropDownList('mat','empty',$mat, array('empty' => 'Selectionnez un materiel')); ?>
			<?php echo $form->error($model,'ID_MATERIEL'); ?>
		</div>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DESCRIPTION_PROBLEME'); ?>
		<?php echo $form->textField($model,'DESCRIPTION_PROBLEME',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'DESCRIPTION_PROBLEME'); ?>
	</div>

	<!--<div class="row">
		<?php echo $form->labelEx($model,'DATE_OUVERTURE'); ?>
		<?php echo $form->dateField($model,'DATE_OUVERTURE'); ?>
		<?php echo $form->error($model,'DATE_OUVERTURE'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DATE_FERMETURE'); ?>
		<?php echo $form->dateField($model,'DATE_FERMETURE'); ?>
		<?php echo $form->error($model,'DATE_FERMETURE'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DATE_FIN_PREVUE'); ?>
		<?php echo $form->textField($model,'DATE_FIN_PREVUE'); ?>
		<?php echo $form->error($model,'DATE_FIN_PREVUE'); ?>
	</div>-->

	<div class="row">
		<?php echo $form->labelEx($model,'PIECE_JOINTE'); ?>
		<?php echo $form->fileField($model,'PIECE_JOINTE'); ?>
		<?php echo $form->error($model,'PIECE_JOINTE'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'URGENCE'); ?>
		<?php echo CHtml::radioButtonList('urgence','field',array(  	'Non prioritaire' => 'Non prioritaire',
																		'Normal' => 'Normal',
																		'Prioritaire' => 'Prioritaire' ),
																	array('labelOptions'=>array('style'=>'display:inline'),
																	'separator' => " " )); ?>
		<?php echo $form->error($model,'URGENCE'); ?>
	</div>

	<!--<div class="row">
		<?php echo $form->labelEx($model,'RESOLU'); ?>
		<?php echo $form->textField($model,'RESOLU'); ?>
		<?php echo $form->error($model,'RESOLU'); ?>
	</div>-->

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Ajouter' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
<script src="js/billetIncident.js"></script>